Skip to content

fix(vertexai): preserve GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in state if explicitly configured for ReasoningEngine#18356

Open
guvenenb wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
guvenenb:telemetry
Open

fix(vertexai): preserve GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in state if explicitly configured for ReasoningEngine#18356
guvenenb wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
guvenenb:telemetry

Conversation

@guvenenb

Copy link
Copy Markdown
Contributor

fix(vertexai): preserve GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY in state if explicitly configured for ReasoningEngine

Update custom flattener for vertex_ai_reasoning_engine spec.deployment_spec.env to only filter out GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY if it was not explicitly defined in the Terraform configuration.

When configured in HCL, the environment variable is now correctly preserved in state, allowing telemetry settings to be managed via Terraform. Added unit test covering both scenarios.

Fixes hashicorp/terraform-provider-google#28409
b/537345781

vertexai: fixed an issue where `GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY` environment variable in `google_vertex_ai_reasoning_engine` was ignored in state when explicitly configured

… state if explicitly configured for ReasoningEngine
@github-actions
github-actions Bot requested a review from melinath July 22, 2026 13:43
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@melinath, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician

modular-magician commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 4065b1e:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 173 insertions(+), 1 deletion(-)
google-beta provider View Diff 2 files changed, 173 insertions(+), 1 deletion(-)

Test report

Analytics

Total Tests Passed Skipped Affected
105 98 7 0
Affected Service Packages
  • vertexai

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@guvenenb, @melinath VCR tests complete for 4065b1e!

@melinath melinath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do a local review with a Google engineer from the service team as described at go/terraform-service-review. Let me know when that's finished and I'll follow up with final review & merge.

(Please also add some details to the initial comment about why this change is being made in this way - the original behavior of the resource is unusual and this change makes it even more unusual.)

var envList []interface{}
if set, ok := envRaw.(*schema.Set); ok {
envList = set.List()
} else if list, ok := envRaw.([]interface{}); ok {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use some old go version that doesn't have any keyword ?

Suggested change
} else if list, ok := envRaw.([]interface{}); ok {
} else if list, ok := envRaw.([]any); ok {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY env var ignored in state for reasoningEngine

4 participants